<template>
	<view class="list">
		<view class="pad-30 flex" v-for="(item,index) in list">
			<image class="banner" :src="baseUrl + item.avatar"></image>
			<view class="mar-left-20">{{item.title}}</view>
		</view>
	</view>
</template>

<script setup>
	import {
		ref,
		reactive
	} from 'vue';
	// 接口引入
	import {
		learningList
	} from '/config/api.js';

	import {
		onLoad
	} from '@dcloudio/uni-app';

	import {
		baseUrl
	} from '@/common/config.js'

	import {
		toast
	} from '@/uni_modules/uview-plus'

	// 获取列表
	let params = reactive({
		page: 1,
		page_size: 15
	})

	// 获取错题集
	let list = ref([])
	const getListInfo = () => {
		learningList(params).then(({
			data
		}) => {
			list.value = list.value.concat(data.data)
		})
	}

	// 初始化加载
	onLoad(() => {
		getListInfo();
	})
</script>

<style scoped>
	.banner {
		display: block;
		width: 200rpx;
		height: 200rpx;
	}
</style>